#pragma once
#include<string>
#include<fstream>
#include <iomanip> 
using namespace std;

// 基类
class Student { 
public:
    string studentId;  // 学号
    string name;       // 姓名
    char gender;       // 性别
    int age;          // 年龄
    string className; // 班级

public:
    Student() {}
    virtual ~Student() {}
    
    // 纯虚函数声明
    virtual void input() = 0;
    virtual void display() const = 0;
    virtual double calculateTotalScore() const = 0;
    virtual void save(ofstream& out) const = 0;
    virtual void load(ifstream& in) = 0;
    //virtual double getEnglish() = 0;
    //virtual double getMath() = 0;
    //virtual double getChinese() = 0;
    
    // 非虚函数
    string getStudentId() const { return studentId; }
    string getName() const { return name; }
};

void myprint(std::string str);

class Centered {
    int width;
public:
    Centered(int w) : width(w) {}

    friend std::ostream& operator<<(std::ostream& os, const Centered& centered);
};
